package com.ruoyi.erp.service.impl;

import com.ruoyi.erp.domain.HrHiPerson;
import com.ruoyi.erp.mapper.HrHiPersonMapper;
import com.ruoyi.erp.service.IHrHiPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员Service业务层处理
 * 
 * @author ztj
 * @date 2024-08-21
 */
@Service
public class HrHiPersonServiceImpl implements IHrHiPersonService 
{
    @Autowired
    private HrHiPersonMapper hrHiPersonMapper;

    /**
     * 查询人员
     * 
     * @param cpsnNum 人员主键
     * @return 人员
     */
    @Override
    public HrHiPerson selectHrHiPersonByCpsnNum(String cpsnNum)
    {
        return hrHiPersonMapper.selectHrHiPersonByCpsnNum(cpsnNum);
    }

    /**
     * 查询人员列表
     * 
     * @param hrHiPerson 人员
     * @return 人员
     */
    @Override
    public List<HrHiPerson> selectHrHiPersonList(HrHiPerson hrHiPerson)
    {
        return hrHiPersonMapper.selectHrHiPersonList(hrHiPerson);
    }

    /**
     * 新增人员
     * 
     * @param hrHiPerson 人员
     * @return 结果
     */
    @Override
    public int insertHrHiPerson(HrHiPerson hrHiPerson)
    {
        return hrHiPersonMapper.insertHrHiPerson(hrHiPerson);
    }

    /**
     * 修改人员
     * 
     * @param hrHiPerson 人员
     * @return 结果
     */
    @Override
    public int updateHrHiPerson(HrHiPerson hrHiPerson)
    {
        return hrHiPersonMapper.updateHrHiPerson(hrHiPerson);
    }

    /**
     * 批量删除人员
     * 
     * @param cpsnNums 需要删除的人员主键
     * @return 结果
     */
    @Override
    public int deleteHrHiPersonByCpsnNums(String[] cpsnNums)
    {
        return hrHiPersonMapper.deleteHrHiPersonByCpsnNums(cpsnNums);
    }

    /**
     * 删除人员信息
     * 
     * @param cpsnNum 人员主键
     * @return 结果
     */
    @Override
    public int deleteHrHiPersonByCpsnNum(String cpsnNum)
    {
        return hrHiPersonMapper.deleteHrHiPersonByCpsnNum(cpsnNum);
    }
}
